package com.fish.anne.dao.ibatis;

import com.fish.anne.dao.SystemAdminUserDao;
import com.fish.anne.model.SystemAdminUser;

public class SystemAdminUserDaoiBatis extends GenericDaoiBatis<SystemAdminUser, Long> implements SystemAdminUserDao {

    public SystemAdminUserDaoiBatis() {
        super(SystemAdminUser.class);
    }
    
    public void updateSystemAdminUserPassword(SystemAdminUser systemAdminUser){
    	this.getSqlMapClientTemplate().update("updateSystemAdminUserPassword", systemAdminUser);
    }
    
    public SystemAdminUser getByNameAndPassword(String name, String password) {		
		SystemAdminUser systemAdminUser = new SystemAdminUser();
		systemAdminUser.setUsername(name);
		systemAdminUser.setUserpass(password);		
		SystemAdminUser object = (SystemAdminUser) getSqlMapClientTemplate().queryForObject("getByNameAndPassword", systemAdminUser);
 
        return object;
		 
	}
}
